package com.medical.literature.document.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.medical.literature.document.dto.LiteratureQueryRequest;
import com.medical.literature.document.dto.LiteratureResponse;
import com.medical.literature.document.entity.Literature;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 文献Mapper接口
 */
@Mapper
public interface LiteratureMapper extends BaseMapper<Literature> {
    
    /**
     * 分页查询文献列表
     */
    IPage<LiteratureResponse> selectLiteraturePage(Page<LiteratureResponse> page, 
                                                  @Param("query") LiteratureQueryRequest query,
                                                  @Param("userId") Long userId);
    
    /**
     * 分页查询收藏文献列表
     */
    IPage<LiteratureResponse> selectFavoriteLiteraturePage(Page<LiteratureResponse> page, 
                                                          @Param("query") LiteratureQueryRequest query,
                                                          @Param("userId") Long userId);
}